package nl.stroep.classbuilder.application.events
{
	import flash.events.Event;
	
	/**
	 * ...
	 * @author Mark Knol
	 */
	public class PageEvent extends Event 
	{
		public static const NEW_PAGE:String = "NEW_PAGE";
		private var _pageName:String;
		
		public function PageEvent(type:String, pageName:String, bubbles:Boolean=false, cancelable:Boolean=false) 
		{ 
			super(type, bubbles, cancelable);
			
			_pageName = pageName;
		} 
		
		public override function clone():Event 
		{ 
			return new ApplicationEvent(type, pageName, bubbles, cancelable);
		} 
		
		public override function toString():String 
		{ 
			return formatToString("PageEvent", "type", "pageName", "bubbles", "cancelable", "eventPhase"); 
		}
		
		public function get pageName():String { return _pageName }
		
	}	
}